home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / src / binutils.252 / ld / ldemul.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-18  |  3.9 KB  |  113 lines

  1. /* ld-emul.h - Linker emulation header file
  2.  
  3.    Copyright 1991, 1992 Free Software Foundation, Inc.
  4.  
  5.    This file is part of GLD, the Gnu Linker.
  6.  
  7.    GLD is free software; you can redistribute it and/or modify
  8.    it under the terms of the GNU General Public License as published by
  9.    the Free Software Foundation; either version 1, or (at your option)
  10.    any later version.
  11.  
  12.    GLD is distributed in the hope that it will be useful,
  13.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.    GNU General Public License for more details.  */
  16.  
  17. #ifndef LDEMUL_H
  18. #define LDEMUL_H
  19.  
  20. #if ANSI_PROTOTYPES
  21. struct lang_input_statement_struct;
  22. #endif
  23.  
  24. extern void ldemul_hll PARAMS ((char *));
  25. extern void ldemul_syslib PARAMS ((char *));
  26. extern void ldemul_after_parse PARAMS ((void));
  27. extern void ldemul_before_parse PARAMS ((void));
  28. extern void ldemul_after_allocation PARAMS ((void));
  29. extern void ldemul_before_allocation PARAMS ((void));
  30. extern void ldemul_set_output_arch PARAMS ((void));
  31. extern char *ldemul_choose_target PARAMS ((void));
  32. extern void ldemul_choose_mode PARAMS ((char *));
  33. extern char *ldemul_get_script PARAMS ((int *isfile));
  34. extern void ldemul_finish PARAMS ((void));
  35. extern void ldemul_create_output_section_statements PARAMS ((void));
  36. extern boolean ldemul_place_orphan
  37.   PARAMS ((struct lang_input_statement_struct *, asection *));
  38. extern boolean ldemul_open_dynamic_archive
  39.   PARAMS ((const char *, struct lang_input_statement_struct *));
  40. extern char *ldemul_default_target PARAMS ((void));
  41. extern void after_parse_default PARAMS ((void));
  42. extern void after_allocation_default PARAMS ((void));
  43. extern void before_allocation_default PARAMS ((void));
  44. extern void set_output_arch_default PARAMS ((void));
  45. extern void syslib_default PARAMS ((char*));
  46. extern void hll_default PARAMS ((char*));
  47.  
  48. typedef struct ld_emulation_xfer_struct
  49. {
  50.   /* Run before parsing the command line and script file.
  51.      Set the architecture, maybe other things.  */
  52.   void   (*before_parse) PARAMS ((void));
  53.  
  54.   /* Handle the SYSLIB (low level library) script command.  */
  55.   void   (*syslib) PARAMS ((char *));
  56.  
  57.   /* Handle the HLL (high level library) script command.  */
  58.   void   (*hll) PARAMS ((char *));
  59.  
  60.   /* Run after parsing the command line and script file.  */
  61.   void   (*after_parse) PARAMS ((void));
  62.  
  63.   /* Run after allocating output sections.  */
  64.   void   (*after_allocation) PARAMS ( (void));
  65.  
  66.   /* Set the output architecture and machine if possible.  */
  67.   void   (*set_output_arch) PARAMS ((void));
  68.  
  69.   /* Decide which target name to use.  */
  70.   char * (*choose_target) PARAMS ((void));
  71.  
  72.   /* Run before allocating output sections.  */
  73.   void   (*before_allocation) PARAMS ((void));
  74.  
  75.   /* Return the appropriate linker script.  */
  76.   char * (*get_script) PARAMS ((int *isfile));
  77.  
  78.   /* The name of this emulation.  */
  79.   char *emulation_name;
  80.  
  81.   /* The output format.  */
  82.   char *target_name;
  83.  
  84.   /* Run after assigning values from the script.  */
  85.   void    (*finish) PARAMS ((void));
  86.  
  87.   /* Create any output sections needed by the target.  */
  88.   void    (*create_output_section_statements) PARAMS ((void));
  89.  
  90.   /* Try to open a dynamic library.  ARCH is an architecture name, and
  91.      is normally the empty string.  ENTRY is the lang_input_statement
  92.      that should be opened.  */
  93.   boolean (*open_dynamic_archive)
  94.     PARAMS ((const char *arch, struct lang_input_statement_struct *entry));
  95.  
  96.   /* Place an orphan section.  Return true if it was placed, false if
  97.      the default action should be taken.  This field may be NULL, in
  98.      which case the default action will always be taken.  */
  99.   boolean (*place_orphan)
  100.     PARAMS ((struct lang_input_statement_struct *, asection *));
  101. } ld_emulation_xfer_type;
  102.  
  103. typedef enum 
  104. {
  105.   intel_ic960_ld_mode_enum,
  106.   default_mode_enum ,
  107.   intel_gld960_ld_mode_enum
  108. } lang_emulation_mode_enum_type;
  109.  
  110. extern ld_emulation_xfer_type *ld_emulations[];
  111.  
  112. #endif
  113.